create or replace function volcado_simulacion() 
returns void as 
$body$
declare	
	
begin

delete from ITINERARIO_SIM;
delete from VUELO_SIM;
delete from AVION_SIM;
delete from PRONOSTICO_SIM;
delete from AEROPUERTO_SIM;
delete from PAQUETE_SIM;

insert into avion_sim select * from avion;
insert into aeropuerto_sim select * from aeropuerto;
insert into vuelo_sim select * from vuelo;

end;
$body$
language plpgsql;

--select volcado_simulacion();


